package com.dididoctor.doctor.Activity.Usercentre.Authentication;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

import com.dididoctor.doctor.Dialog.adapter.BaseDialog;
import com.dididoctor.doctor.R;


public class BaiDuMapDialog extends BaseDialog {
    private TextView tv_content,tv_confirm,tv_cancel;
    private Context context;
    private String address;
    private Submitlistener submitlistener;
    public BaiDuMapDialog(Context context, String address, Submitlistener submitlistener) {
        super(context);
        this.context = context;
        this.address = address;
        this.submitlistener = submitlistener;
        setContentView(R.layout.dialog_baidumap);
       initview();

    }

    private void initview() {
        tv_content = (TextView) findViewById(R.id.tv_content);//持卡人姓名
        tv_confirm = (TextView) findViewById(R.id.tv_confirm);//确定按键
        tv_confirm.setOnClickListener(this);
        tv_cancel = (TextView) findViewById(R.id.tv_cancel);//取消按钮
        tv_cancel.setOnClickListener(this);
        tv_content.setText("请您确认设置"+address+"为您的执业医院");
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.tv_confirm:
                submitlistener.submitok();
                dismiss();
                break;
            case R.id.tv_cancel:
                dismiss();
                break;
            default:
                break;
        }
        super.onClick(v);
    }
    public interface Submitlistener {
        void submitok();
    }
}
